package com.mvp.shq.washer.ui.shop.productDetail;

import com.mvp.shq.washer.base.BaseModel;
import com.mvp.shq.washer.base.BasePresenter;
import com.mvp.shq.washer.base.BaseView;
import com.mvp.shq.washer.entity.result.BaseResult;
import com.mvp.shq.washer.entity.shop.CollectResponse;
import com.mvp.shq.washer.entity.shop.Product;

import java.util.List;

import io.reactivex.Observable;

/**
 * Created by Administrator on 2017/10/10.
 */

public interface ProductDetailConstract {
    interface Model extends BaseModel{
        Observable<BaseResult<Product>> getProductDetail(String userId,String productId);
        Observable<BaseResult<Product>> getProductDetailBySpu(String userId,String productId);
        Observable<BaseResult<Product>> getProductByAttr(String productId,String attrs);
        Observable<BaseResult<String>> collectProduct(String token,String userId,List<CollectResponse> list);
        Observable<BaseResult<String>> delProduct(String token,String userId,String productId);
    }
    interface View extends BaseView{
        void getProductInfoS(Product product);
        void getProductByAttrS(Product product);
        void collectProductS();
        void delCollectProductS();
    }
    abstract class Presenter extends BasePresenter<Model,View>{
        abstract void getProductInfo(String productId);
        abstract void getProductInfoBySpu(String productId);
        abstract void getProductByAttr(String productId,String attrs);
        abstract void collectProduct(String productId);
        abstract void delCollectProduct(String productId);
    }
}
